/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aeronef.appStates;

import com.jme3.app.Application;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.asset.AssetManager;
import com.jme3.audio.AudioRenderer;
import com.jme3.input.InputManager;
import com.jme3.renderer.Camera;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Node;
import aeronef.MainApp;

/**
 *
 * @author Hagan
 */
public class BasicAppState extends AbstractAppState {

    protected SimpleApplication app;
    
    protected Node rootNode;
    protected Node guiNode;
            
    protected AssetManager assetManager;
    protected AppStateManager stateManager;
    protected InputManager inputManager;
    
    protected AudioRenderer audioRenderer;
    
    protected ViewPort viewPort;
    protected ViewPort guiViewPort;
    protected Camera cam;

    @Override
    public void initialize(AppStateManager stateManager, Application app) {
        super.initialize(stateManager, app);
        this.app = (MainApp) app;
        this.rootNode = this.app.getRootNode();
        this.guiNode = this.app.getGuiNode();
        this.assetManager = this.app.getAssetManager();
        this.stateManager = this.app.getStateManager();
        this.inputManager = this.app.getInputManager();
        this.audioRenderer = this.app.getAudioRenderer();
        this.viewPort = this.app.getViewPort();
        this.guiViewPort = this.app.getGuiViewPort();
        this.cam = this.app.getCamera();
    }
    
    @Override
    public void update(float tpf) {}

    
    public SimpleApplication getApp() { return app; }
    public AssetManager getAssetManager() { return assetManager; }
    public AudioRenderer getAudioRenderer() { return audioRenderer; }
    public Camera getCam() { return cam; }
    public Node getGuiNode() { return guiNode; }
    public ViewPort getGuiViewPort() { return guiViewPort; }
    public InputManager getInputManager() { return inputManager; }
    public Node getRootNode() { return rootNode; }
    public AppStateManager getStateManager() { return stateManager; }
    public ViewPort getViewPort() { return viewPort; }
       
    public void setApp(SimpleApplication app) { this.app = app; }
    public void setAssetManager(AssetManager assetManager) { this.assetManager = assetManager; }
    public void setAudioRenderer(AudioRenderer audioRenderer) { this.audioRenderer = audioRenderer; }
    public void setCam(Camera cam) { this.cam = cam; }
    public void setGuiNode(Node guiNode) { this.guiNode = guiNode; }
    public void setGuiViewPort(ViewPort guiViewPort) { this.guiViewPort = guiViewPort; }
    public void setInputManager(InputManager inputManager) { this.inputManager = inputManager; }
    public void setRootNode(Node rootNode) { this.rootNode = rootNode; }
    public void setStateManager(AppStateManager stateManager) { this.stateManager = stateManager; }
    public void setViewPort(ViewPort viewPort) { this.viewPort = viewPort; }
    
}
